#include "BDZmqBase.h"
#include "zmq.h"

void* BDZmqBase::m_pContext = NULL;

BDZmqBase::BDZmqBase()
{
	if (m_pContext == NULL)
	{
		m_pContext = zmq_init(0);
	}
}


BDZmqBase::~BDZmqBase()
{
	if (m_pContext != NULL) {
		zmq_term(m_pContext);
		m_pContext = NULL;
	}
}
